<%= stylesheet('bootstrap','style','jquery.atwho')%>

<div class="reply-box">
	<% if !current_user %>
		<p>登录后可进行评论，请先 <%= link_to '登录', login_path %> 或 <%= link_to '注册', reg_path %></p>
	
	<% else %>
		<%= form_for [item, Comment.new] do |f| %>
			<div class="control-group">
				<label class="control-label" >评论内容：</label>
				<div class="controls">
					<%=f.hidden_field :user_id, :id=> 'user_id', :value => current_user.id %>
					<%= f.hidden_field :topic_id, :id => 'topic_id', :value => item.id %>
          			<%= f.hidden_field :current_nickname, :id => 'current_nickname', :value => current_user.nickname %>
					<%= f.text_area :content, :id => "comment-textarea", :rows => 5,:cols => 50, :class => "span5", :placeholder => "限500字以内..."%>
				</div>
			</div>
			<%= f.submit '评论', :class => 'btn btn-success'%>
		<% end %>
	<% end %>

</div>
